/**
 * Copyright 2008 Matthew Purland (m.purland@gmail.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.variance.version.branch;

import java.util.List;

import org.variance.version.Revision;
import org.variance.version.identifier.RevisionIdentifier;
import org.variance.version.merge.Merge;

/**
 * A branch defined for a continuable list of source revisioned objects of type A
 * to target revisioned objects of type A.
 *
 * A branch will be specified as divergent when the branch was created OR
 * when the branch was last updated completely from the source.
 *
 * Every file is a part of a branch.
 *
 * @author Matthew Purland
 *
 * @todo Define how branches can be defined generically and then for File text branches (normal)
 */
public interface Branch {

    /**
     * Get the list of all revisionable objects associated
     * with the branch.
     */
    List<Revision> getRevisionList();

    /**
     * Get the latest revision identifier that a branch is up to date with.
     *
     * @return the <code>RevisionIdentifier</code> associated with the latest.
     */
    RevisionIdentifier getLatestRevisionIdentifier();

    /**
     * Provide a merge between two different branches.
     *
     * Maybe this shouldn't be a part of branch?
     *
     */
    Merge getMerge(Branch branch);
}
